package com.nofeng.wx.controller.mobile;

import com.alibaba.fastjson.JSONObject;
import com.nofeng.wx.service.MobileAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MobileController {

    @Autowired
    MobileAppService mobileAppService;

    @RequestMapping(value = "/mobile/index")
    public String index() {
        return "index2407051223";
    }

    @RequestMapping(value = "/mobile/stop")
    public String stop() {
        mobileAppService.stop();
        return "SUCCESS";
    }


    @RequestMapping(value = "/mobile/restart")
    public String reStart() {
        return JSONObject.toJSONString(mobileAppService.reStart());
    }

    @RequestMapping(value = "/mobile/ali")
    public String ali() {
        mobileAppService.ali();
        return "SUCCESS";
    }

    @RequestMapping(value = "/mobile/s")
    public String s() {
        mobileAppService.s();
        return "SUCCESS";
    }
}


